/****************************************************
    Author:            龙之介
    CreatTime:    #CreatTime#
    Description:     Nothing
*****************************************************/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using UnityEngine.UI;
using ZYKTool;
using System.Linq;



namespace LongZhiJie
{
    public class Gun1 : Gun基本属性
    {
        #region 常量
        #endregion

        #region 事件
        #endregion

        #region 字段
        #endregion


        #region 属性 
        #endregion

        private int ShootCount = 0;
        private float timer = 0;
        #region 方法 
        public override void Attack()
        {
            //(Time.time-timer>1)

            //Debug.LogError("attack" + 1);
            ZYKTool.Timer.ZYKTimerSystemTool.Instance.ZYKTimerAddTimerTask(
           () =>
           {
               GameObject go = Instantiate(_projectile, _shotPoint.position, _shotPoint.rotation);
               // Instantiate(_projectile, _shotPoint.position, _shotPoint.rotation);
               Projectile bullet = go.GetOrAddComponent<Projectile>();
               bullet.damage = Damage;
               bullet.speed = 50;
               bullet.lifeTime = 2;

           }, 0.2f, Count);


         
            //bullet.transform.Rotate(new Vector3());
   
        }

        public override void Init(GameObject projectile, GameObject shotEffect, Transform shotPoint)
        {
            base.Init(projectile, shotEffect, shotPoint);
        }
        #endregion

        #region Unity回调
        #endregion

        #region 事件回调
        #endregion

        #region 帮助方法
        #endregion

    }
}